package com.gf.forcesystem.service.weather;

import com.gf.forcesystem.model.dto.weather.*;
import com.gf.forcesystem.api.WeatherService;
import com.gf.forcesystem.websocket.ForceClientWebsocketManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author gaofei
 * @date 2022/6/19 19:47
 * 将天气信息广播给兵力软件
 */
@Service("BroadcastWeatherServiceImpl")
public class BroadcastWeatherServiceImpl implements WeatherService {
    @Autowired
    ForceClientWebsocketManager forceClientWebsocketManager;

    @Override
    public void deal(AbstractWeather weather) {
        forceClientWebsocketManager.broadcastMessage(weather);
    }
}
